package com.lry.crawlers.cartoon.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("cartoon_update")
public class CartoonUpdate {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String cartoonId;
    private String cartoonUrl;
    private Integer chapterNum;
    private String updateTime;
    private Date creationTime;
    private Integer cartoonVariableId;
    @TableLogic
    private Integer deleted;

    public CartoonUpdate(String cartoonId, String cartoonUrl, Integer chapterNum, Integer cartoonVariableId,String updateTime){
        this.cartoonId = cartoonId;
        this.cartoonUrl = cartoonUrl;
        this.cartoonVariableId = cartoonVariableId;
        this.chapterNum = chapterNum;
        this.updateTime = updateTime;
        this.creationTime = new Date();
    }
}
